package com.kaibes.module.theme;

import java.util.ArrayList;
import java.util.List;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class ThemeConfig implements WebMvcConfigurer {
    
    public final static String THEME_DIR = "templates/";
    private List<String> uriList = new ArrayList<>();

    public List<String> getUriList() {
        return uriList;
    }
    
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/*/thumbnail.png", "/*/thumbnail.jpg").addResourceLocations("file:templates/", "classpath:/templates/");
//      registry.addResourceHandler("/**/{filename:\\w+\\.png}").addResourceLocations("file:templates/", "classpath:/templates/");
    }

}
